feat: regenerate controlplane client with DrivePermission types (ENG-2761)#176
feat: regenerate controlplane client with DrivePermission types (ENG-2761)#176devin-ai-integration[bot] wants to merge 5 commits into
Conversation
…2761) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
✅ Linked to Linear issue ENG-2761 — status already In Progress, PR attached to issue. Note Posted by Linear Issue Enforcer · Tag @mendral-app with feedback. |
🔀 Component Interaction DiagramThis PR regenerates the controlplane client, introducing Drive Permission types (ENG-2761) and Application CRUD endpoints. Here's how the new components interact: sequenceDiagram
participant SDK as SDK User
participant Client as API Client
participant AppAPI as applications/ API
participant DriveAPI as drives/ API
participant Models as models/
Note over SDK, Models: Drive Permissions Flow (ENG-2761)
SDK->>Client: Configure drive access
Client->>DriveAPI: PUT /drives/{id} (DriveSpec)
DriveAPI->>Models: DriveSpec.permissions[]
Models->>Models: DrivePermission(labels, mode, path)
Models->>Models: DrivePermissionLabels (AND match)
Models->>Models: DrivePermissionMode (ro/rw)
DriveAPI-->>Client: Drive with ACL applied
Note over SDK, Models: Application CRUD Flow (new)
SDK->>Client: Manage applications
Client->>AppAPI: POST /applications (create)
AppAPI->>Models: Application + ApplicationSpec
Models->>Models: AppRevision + AppRevisionConfiguration
AppAPI-->>Client: Application (with AppUrl)
Client->>AppAPI: GET /applications (list, paginate)
AppAPI->>Models: ApplicationList + ListApplicationsAnchor/Sort
AppAPI-->>Client: Paginated results
Client->>AppAPI: GET /applications/{id}/revisions
AppAPI-->>Client: AppRevision[]
Note over SDK, Models: Custom Domain Updates
SDK->>Client: Create custom domain
Client->>AppAPI: POST custom domain
AppAPI->>Models: CustomDomainSpec + SubjectAlternativeNamesItem
AppAPI-->>Client: Domain configured
Summary of Key Flows
Note Posted by PR Sequence Diagram · Tag @mendral-app with feedback. |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Re: the |
🧪 Testing GuideWhat this PR addressesRegenerates the controlplane API client from the updated OpenAPI spec to add per-drive ACL enforcement (ENG-2761) and Application CRUD support. Key additions:
Steps to reproduce / exercise the new behaviorSince this is primarily generated client code + a new test suite, focus on:
What to verify (expected behavior)
Note Posted by PR Testing Guide · Tag @mendral-app with feedback. |
Replace manual test with proper pytest integration test in tests/integration/core/sandbox/test_drive_acl.py following the existing TestDriveOperations pattern. Covers all 9 ACL scenarios: open-access, label-match, label-mismatch, read-only, OR logic, AND logic, path scoping, update permissions, and wildcard permission. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Needs attention
The new commit is a small, correct improvement to the test. The import and usage of the generated client are valid. The previous comment on drive_spec.py:77 (permissions initialized to [] instead of UNSET) remains unaddressed — acknowledged by the PR description as a known generator issue left intentionally.
Tag @mendral-app with feedback or questions. View session
Summary
Regenerates the controlplane API client from the updated OpenAPI spec on
main, following the merge of controlplane#4582 (ENG-2761 per-drive ACL enforcement).New generated types:
DrivePermission— permission entry onDriveSpec.permissionscontrolling which workloads can access a driveDrivePermissionLabels— label selector for workload matching (AND semantics)DrivePermissionMode— enum for access mode (ro/rw)Also picks up other spec changes (Application CRUD endpoints,
CustomDomainSpecupdates, etc.) and applies repo-wideruff format+ruff check --fix.Link to Devin session: https://app.devin.ai/sessions/b02184131e02423089176e050314e167
Requested by: @drappier-charles
Note
New commit replaces raw httpx usage in the drive ACL integration test with the generated
update_driveAPI client, addressing a code quality concern. The previously flaggeddrive_spec.pypermissions deserialization issue remains unchanged.Written by Mendral for commit bdde339.